//
//  YWMessage.h
//  maintain
//
//  Created by Kyo on 16/4/22.
//  Copyright © 2016年 ewin. All rights reserved.
//

#import <Foundation/Foundation.h>
@class YWHandler;

typedef NS_ENUM(NSUInteger, YWMessageType) {
    YWMessageTypePublicNotice = 0, //公告
    YWMessageTypeWorkNotice = 1, //临时任务
    YWMessageTypeWorkNoticeReply = 2, //临时任务的回复
    YWMessageTypePushMessage = 3, //推送的消息
};
typedef NS_ENUM(NSUInteger, YWSessionType) {
    YWSessionTypeSingalChat = 0, //单聊
    YWSessionTypeGroupChat = 1, //群聊
};

@interface YWMessage : NSObject

//@property (nonatomic, assign) NSInteger rowId;
@property (nonatomic, copy) NSString *sessionId;
@property (nonatomic, assign) YWSessionType sessionType;
@property (nonatomic, copy) NSString *sessionName;

@property (nonatomic, copy) NSString *messageId;
@property (nonatomic, assign) YWMessageType messageType;
@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *message;

@property (nonatomic, assign) NSInteger toUserId;
@property (nonatomic, assign) NSInteger fromUserId;

@property (nonatomic, assign) NSTimeInterval createTime;
@property (nonatomic, assign) NSInteger status;

@property (nonatomic, assign) BOOL isRead;
@property (nonatomic, copy) NSString *relationId;
@property (nonatomic, assign) NSInteger relationType;

///页面显示时用
//@property (nonatomic, strong) YWHandler* toUser;
@property (nonatomic, strong) YWHandler* fromUser;
@end
